Skip to content

[deckhouse-cli] Fix the ClusterRole and cache timing in RPP docs - #443

Draft
Glitchy-Sheep wants to merge 2 commits into
mainfrom
fix/rpp-endpoint-candidates
Draft

[deckhouse-cli] Fix the ClusterRole and cache timing in RPP docs#443
Glitchy-Sheep wants to merge 2 commits into
mainfrom
fix/rpp-endpoint-candidates

Conversation

@Glitchy-Sheep

@Glitchy-Sheep Glitchy-Sheep commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

The docs told admins to bind the wrong ClusterRole for plugins, and told users to wait five minutes for something that clears in thirty seconds. Both claims were checked against the code and fixed.

Problem

  • plugins.md said plugin downloads need d8:registry-packages-proxy:packages-download, and that it differs from self-update's cli-download. Wrong on both counts. Plugins are published under deckhouse-cli/plugins/<name> and travel the same /v1/images/ route, which the proxy guards with the cli-binary subresource. An admin following these docs bound a role that grants nothing, and downloads kept returning 403.
  • Both pages said authorization is cached for about 5 minutes and told the user to fetch a fresh token. The proxy caches a denial for 30 seconds and an approval for 5 minutes. So a 403 clears by itself in half a minute, and a new token changes nothing.
  • Neither page mentioned that endpoint discovery reads the registry-packages-proxy Ingress. A narrower identity without that permission fails before it ever reaches the proxy.
  • internal/selfupdate/README.md listed the download route as /v1/images/deckhouse-cli/tags/<tag>. The proxy does not serve that path.

Fix

  • One role for everything: cli-download covers d8 cli and d8 plugins.
  • Correct cache numbers, with the practical advice ("retry in half a minute").
  • The Ingress read permission is now named in both pages.
  • The download route is /v1/images/deckhouse-cli/images/<version>?platform=<os>-<arch>.
  • Both pages link to the module docs for the grant commands, so the recipe lives in one place.

Before / After

Before: an admin bound packages-download, plugins still returned 403, and the docs blamed a five-minute cache.

After: the docs name the one role that works, the one extra permission discovery needs, and the real 30-second retry window.

Notes

Depends on deckhouse#21933, which adds the "Granting access to CLI downloads" section both pages link to.

@Glitchy-Sheep Glitchy-Sheep self-assigned this Aug 7, 2026
- Plugins need `cli-download`, not `packages-download`: they live under `deckhouse-cli/plugins/<name>` and travel the same `/v1/images/` route as self-update.
- The proxy caches a denial for 30 seconds, so a `403` clears by itself. A fresh token does nothing.
- Endpoint discovery reads the `registry-packages-proxy` Ingress, so an identity also needs `get` on it.
- Point both docs at the module page for the grant commands, and fix the download route to `/images/<version>`.

Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
@Glitchy-Sheep
Glitchy-Sheep force-pushed the fix/rpp-endpoint-candidates branch from b85e3a6 to 4f41578 Compare August 12, 2026 08:32
@Glitchy-Sheep Glitchy-Sheep changed the title [deckhouse-cli] Read RPP addresses published by the cluster [deckhouse-cli] Fix the ClusterRole and cache timing in RPP docs Aug 12, 2026
- New "Getting started" section in `self-update.md`: ask for access, get a kubeconfig, check it, use it.
- It links to the module page for the grant commands, so a user knows what to ask the administrator for.
- `plugins.md` points at the same walkthrough: one kubeconfig and one grant cover both.

Signed-off-by: Roman Berezkin <roman.berezkin@flant.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant